package com.luozongyao.statistics.controller;


import com.luozongyao.commons.R;
import com.luozongyao.statistics.service.ReportVideoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luozongyao
 * @since 2021-11-10
 */
@Api(description="统计举报视频信息管理")
@RestController
@RequestMapping("/statistics/report-video")
@CrossOrigin
public class ReportVideoController {

    @Autowired
    private ReportVideoService reportVideoService;
    //获取某天视频被举报数
    @ApiOperation(value = "获取某天视频被举报数")
    @GetMapping("reportVideoCount/{day}")
    public R getReportVideoCount(@PathVariable String day){

        Integer reportVideoCount= reportVideoService.getReportVideoCount(day);
        return R.ok().data("reportVideoCount",reportVideoCount);
    }


}

